package com.tm.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel(value = "天马-OA 权限 实体类",description = "天马-OA 实体类")
@TableName("t_permission")
@HeadRowHeight(value = 35)
@ContentRowHeight(value = 25)
public class Permission {

    @ApiModelProperty(value = "主键",required = true,dataType = "number")
    @TableId(type = IdType.AUTO)
    @ExcelProperty(value = {"权限信息","id"},order = 1)
   private Integer  id	;           //int(10)	主键

    @ApiModelProperty(value = "权限名称",required = true,dataType = "String")
    @ExcelProperty(value = {"权限信息","权限名称"},order = 2)
   private String  name;       //varchar(50)	权限名称

    @ApiModelProperty(value = "上级权限ID",required = true,dataType = "number")
    @ExcelProperty(value = {"权限信息","pid"},order = 3)
   private Integer  pid	;           //int(10)	上级权限ID

    @ApiModelProperty(value = "权限标识符",required = true,dataType = "String")
    @ExcelProperty(value = {"权限信息","权限标识符"},order = 4)
   private String  permission_identifier;//varchar(100)	权限标识符

    @ApiModelProperty(value = "权限地址",required = true,dataType = "String")
    @ExcelProperty(value = {"权限信息","权限地址"},order = 5)
   private String  url	;           //varchar(255)	权限地址

    @ApiModelProperty(value = "类型：1菜单 2按钮",required = true,dataType = "number")
    @ExcelProperty(value = {"权限信息","类型"},order = 6)
   private Integer  type;           //int(1)	类型：1菜单 2按钮

    @ApiModelProperty(value = "图标样式",required = true,dataType = "String")
    @ExcelProperty(value = {"权限信息","图标样式"},order = 6)
   private String  icon;           //varchar(255)	图标样式

    @ApiModelProperty(value = "排序号",required = true,dataType = "number")
    @ExcelProperty(value = {"权限信息","排序号"},order = 7)
   private Integer  sort_number	;   //int(5)	排序号

    @ApiModelProperty(value = "创建时间",required = true,dataType = "Date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelProperty(value = {"权限信息","创建时间"},order = 8)
    @com.alibaba.excel.annotation.format.DateTimeFormat
   private Date  createDate	;   //datetime	创建时间

    @ApiModelProperty(value = "创建时间",required = true,dataType = "Date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ExcelProperty(value = {"权限信息","修改时间"},order = 9)
    @com.alibaba.excel.annotation.format.DateTimeFormat
   private Date updateDate	;   //datetime	修改时间


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getPermission_identifier() {
        return permission_identifier;
    }

    public void setPermission_identifier(String permission_identifier) {
        this.permission_identifier = permission_identifier;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getSort_number() {
        return sort_number;
    }

    public void setSort_number(Integer sort_number) {
        this.sort_number = sort_number;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}
